home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsIRDFResource.idl < prev    next >
C/C++ Source or Header  |  2006-05-08  |  4KB  |  114 lines

  1. /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 1998
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either of the GNU General Public License Version 2 or later (the "GPL"),
  26.  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsrootidl.idl"
  39. #include "nsIRDFNode.idl"
  40.  
  41.  
  42. /**
  43.  * An nsIRDFResource is an object that has unique identity in the 
  44.  * RDF data model. The object's identity is determined by its URI.
  45.  */
  46. [scriptable, uuid(fb9686a7-719a-49dc-9107-10dea5739341)]
  47. interface nsIRDFResource : nsIRDFNode {
  48.     /**
  49.      * The single-byte string value of the resource.
  50.      * @note THIS IS OBSOLETE. C++ should use GetValueConst and script
  51.      *       should use .valueUTF8
  52.      */
  53.     readonly attribute string Value;
  54.  
  55.     /**
  56.      * The UTF-8 URI of the resource.
  57.      */
  58.     readonly attribute AUTF8String ValueUTF8;
  59.  
  60.     /**
  61.      * An unscriptable version used to avoid a string copy. Meant
  62.      * for use as a performance optimization. The string is encoded
  63.      * in UTF-8.
  64.      */
  65.     [noscript] void GetValueConst([shared] out string aConstValue);
  66.  
  67.     /**
  68.      * This method is called by the nsIRDFService after constructing
  69.      * a resource object to initialize it's URI. You would not normally
  70.      * call this method directly
  71.      */
  72.     void Init(in string uri);
  73.  
  74.     /**
  75.      * Determine if the resource has the given URI.
  76.      */
  77.     boolean EqualsString(in string aURI);
  78.  
  79.     /**
  80.      * Retrieve the "delegate" object for this resource. A resource
  81.      * may have several delegate objects, each of whose lifetimes is
  82.      * bound to the life of the resource object.
  83.      *
  84.      * This method will return the delegate for the given key after
  85.      * QueryInterface()-ing it to the requested IID.
  86.      *
  87.      * If no delegate exists for the specified key, this method will
  88.      * attempt to create one using the component manager. Specifically,
  89.      * it will combine aKey with the resource's URI scheme to produce
  90.      * a ContractID as follows:
  91.      *
  92.      *   component:/rdf/delegate-factory/[key]/[scheme]
  93.      *
  94.      * This ContractID will be used to locate a factory using the
  95.      * FindFactory() method of nsIComponentManager. If the nsIFactory
  96.      * exists, it will be used to create a "delegate factory"; that
  97.      * is, an object that supports nsIRDFDelegateFactory. The delegate
  98.      * factory will be used to construct the delegate object.
  99.      */
  100.     void GetDelegate(in string aKey, in nsIIDRef aIID,
  101.                      [iid_is(aIID),retval] out nsQIResult aResult);
  102.  
  103.     /**
  104.      * Force a delegate to be "unbound" from the resource.
  105.      *
  106.      * Normally, a delegate object's lifetime will be identical to
  107.      * that of the resource to which it is bound; this method allows a
  108.      * delegate to unlink itself from an RDF resource prematurely.
  109.      */
  110.     void ReleaseDelegate(in string aKey);
  111. };
  112.  
  113.  
  114.